package com.youku.util;

import java.util.Date;

import org.apache.commons.lang3.time.DateFormatUtils;

public class TimeHelper {

	public static String formatNow() {
		return formatDate(new Date(),"yyyyMMdd_HHmmss");
	}
	
	public static String formatNow(String pattern){
		return formatDate(new Date(),pattern);
	}
	
	public static String formatDate(Date date,String pattern){
		return DateFormatUtils.format(date, pattern);
	}

}
